#pragma once
#include "neighborhood.h"

/************************************************************************/
/* This class inherits from the class Neighborhood and adds a radius to
/* the neighborhood. functions are adjusted according to the variable 
/* neighborhood size.
/************************************************************************/
//ALSO NOTE: It is extended from Neighborhood, so Neighborhood default constructor will be
//called each time any of the constructors are called. Watch out what you do there!


class Neighborhood;

class Neighborhood2: public Neighborhood
{
private:
	int radius;
public:
	int getRadius (void) const;
	void setRadius (int);
	void updateFromImageMatrix(const ImageMatrix& im, int row, int col, int radius=-1);
	Neighborhood2();
	Neighborhood2(int* feature):Neighborhood(feature){};
	Neighborhood2(string feature, int radius = NRADIUS);
	Neighborhood2(int radius);
	Neighborhood2(const Neighborhood2& other);
	Neighborhood2(const ImageMatrix& im, int row, int col, int radius);
	~Neighborhood2();
	bool isEqual (const Neighborhood2& other) const;
	bool hasSameFeature (const Neighborhood2& other) const;
	void updateHash (void);
	void updateFromHash (unsigned long hashValue);	
	int getSize() const;
	friend std::ostream& operator<<(std::ostream& stream, const Neighborhood2& nb2);
	friend void ConvertNB2toNB  (const Neighborhood2& nb2, Neighborhood& nb);
};